package ops.weixin.common.bean;

import java.io.Serializable;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * access token.
 * 
 * @author SuM
 * @date: 2019年12月23日下午3:01:12
 */
public class WxAccessToken implements Serializable {
	private static final long serialVersionUID = 8709719312922168909L;

	private String access_token;

	private int expires_in = -1;

	public static WxAccessToken fromJson(String json) {
		JSONObject jsonObject = JSONObject.parseObject(json);
		return JSON.toJavaObject(jsonObject, WxAccessToken.class);
	}

	public String getAccess_token() {
		return access_token;
	}

	public void setAccess_token(String access_token) {
		this.access_token = access_token;
	}

	public int getExpires_in() {
		return expires_in;
	}

	public void setExpires_in(int expires_in) {
		this.expires_in = expires_in;
	}

}
